
import CLIPSJNI.Environment;
import CLIPSJNI.MultifieldValue;
import CLIPSJNI.PrimitiveValue;

class Test {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		Environment clips = new Environment();
		clips.load("C:/Users/wminglia/Documents/Workspaces/Course projects/wml.clipsjni.test/src/homework.clp");
		clips.reset();
		clips.run();
		MultifieldValue r = (MultifieldValue) clips.eval("(find-all-facts ((?f father-of)) (eq ?f:father mb21))");
		for(int i=0;i<r.multifieldValue().size();i++){
			PrimitiveValue t = r.get(i);
			System.out.println(t.getFactSlot("child"));
		}
		clips.clear();
		clips.destroy();
	}
}
